These functions compute common (leave-one-out) diagnostics for the models in
a bg_GLM object.
# S3 method for bg_GLM
rstandard(model, type = c("sd.1", "predictive"), ...)# S3 method for bg_GLM
rstudent(model, ...)
# S3 method for bg_GLM
hatvalues(model, ...)
# S3 method for bg_GLM
cooks.distance(model, ...)
dffits.bg_GLM(model)
# S3 method for bg_GLM
dfbeta(model, ...)
# S3 method for bg_GLM
dfbetas(model, ...)
covratio.bg_GLM(model)
# S3 method for bg_GLM
influence(model, do.coef = TRUE, region = NULL, ...)
Most influence functions return a numeric matrix in which rownames
are Study ID's and column names are regions. dfbeta and
dfbetas return a numeric array in which each column is a parameter
estimate and the 3rd dimension is for each region. influence returns
a list with class infl.bg_GLM and elements:
Numeric array (like dfbeta) with DFBETAs, DFFITs,
covratios, Cook's distance, and hat values
Logical array of the same data as infmat; values of
TRUE indicate the subject-variable-region combination is an
outlier value
The model formula
The leave-one-out residual standard deviation
Model residuals
A bg_GLM object
The type of standardized residuals. Default: 'sd.1'
Unused
Logical indicating whether to calculate dfbeta
Character string of the region(s) to return results for. Default is to calculate for all regions
Each variable has a different criterion for determining outliers. In the
following: x is the influence variable (for DFBETA, the
criterion applies to all DFBETAs); k is the number of columns of the
design matrix; dfR is the residual degrees of freedom; and n is
the number of observations.
If \(|x| > 1\)
If \(|x| > 3 \sqrt{k / dfR}\)
If \(|1 - x| > (3k / dfR)\)
If \(F_{k, dfR}(x) > 0.5\)
If \(x > 3k / n\)
The return object of influence has a print method which will
list the subjects/variables/regions for which an outlier was detected.
Christopher G. Watson, cgwatson@bu.edu
The influence method calculates all diagnostics present in
lm.influence and
influence.measures, consisting of the following
functions:
Standardized residuals. Choosing type='predictive'
returns leave-one-out cross validation residuals. The “PRESS”
statistic can be calculated as colSums(resids.p^2)
Studentized residuals
The leverage, or the diagonal of the hat/projection matrix
Cook's distance
The change in fitted values when deleting observations
The change in parameter estimates (coefficients) when deleting observations
The scaled change in parameter estimates
The covariance ratios, or the change in the determinant of the covariance matrix of parameter estimates when deleting observations
GLM